package com.itheima.info.manager.controller;

import com.itheima.info.manager.Util.AgeUtil;
import com.itheima.info.manager.domain.Student;


/*
客服类(子类)
 */
public class StudentController extends BaseStudentController{
    @Override
    public Student sealStudent(String sSid) {
        System.out.println("请输入学生姓名:");
        String name = sc.next();
        System.out.println("请输入学生出生日期(yyyy-MM-dd):");
        String birthday = sc.next();

        String age = AgeUtil.getAge(birthday);

        //创建学生对象
        Student stu = new Student();

        //封装学生信息对象
        stu.setId(sSid);
        stu.setName(name);
        stu.setAge(age);
        stu.setBirthday(birthday);

        return stu;
    }
}


